<!DOCTYPE HTML>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $title ?> - version de présentation [pré-alpha]</title>

<!-- Bootstrap -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="<?php echo base_url(); ?>assets/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="<?php echo base_url(); ?>assets/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">

<!-- <link href="<?php echo base_url(); ?>assets/bootstrap-modal/css/bootstrap-modal.css" rel="stylesheet"> -->
<?php
/*
 *  Load css files
 * 
 */
if(isset($css_files))
{
	foreach($css_files as $file):
    echo '<link type="text/css" rel="stylesheet" href="'.base_url().'assets/css/'.$file.'.css" />';
	endforeach;
}
/*
 * Load css related to plugins
 * 
 */
if(in_array('jquery-file-upload', $plugin))
{
	echo '  <!-- Force latest IE rendering engine or ChromeFrame if installed -->
			<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><![endif]-->
			<!-- Generic page styles -->
			<link rel="stylesheet" href="'.base_url().'assets/jquery-file-upload/css/style.css">
			<!-- Bootstrap CSS fixes for IE6 -->
			<!--[if lt IE 7]><link rel="stylesheet" href="http://blueimp.github.com/cdn/css/bootstrap-ie6.min.css"><![endif]-->
			<!-- Bootstrap Image Gallery styles -->
			<link rel="stylesheet" href="http://blueimp.github.com/Bootstrap-Image-Gallery/css/bootstrap-image-gallery.min.css">
			<!-- CSS to style the file input field as button and adjust the Bootstrap progress bars -->
			<link rel="stylesheet" href="'.base_url().'assets/jquery-file-upload/css/jquery.fileupload-ui.css">
			<!-- CSS adjustments for browsers with JavaScript disabled -->
			<noscript><link rel="stylesheet" href="'.base_url().'assets/jquery-file-upload/css/jquery.fileupload-ui-noscript.css"></noscript>
			<!-- Shim to make HTML5 elements usable in older Internet Explorer versions -->
			<!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->';
}

if(in_array('leaflet', $plugin))
{
	echo '<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.4/leaflet.css" />';
	echo '<!--[if lte IE 8]><link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.4/leaflet.ie.css" /><![endif]-->';
	if(in_array('marker-cluster', $plugin))
	{
		// plugin leaflet -> marker cluster
		echo '<link rel="stylesheet" href="'.base_url().'assets/leaflet/plugin/markercluster/MarkerCluster.css" />
		  <link rel="stylesheet" href="'.base_url().'assets/leaflet/plugin/markercluster/MarkerCluster.Default.css" />
		  <!--[if lte IE 8]><link rel="stylesheet" href="'.base_url().'assets/leaflet/plugin/markercluster/MarkerCluster.Default.ie.css" /><![endif]-->';
	}
}

if(in_array('fineuploader', $plugin))
{
	echo '<link rel="stylesheet" href="'.base_url().'assets/fineuploader/fineuploader-bootstraped.css">';
}

?>

</head>
<body style="padding-top: 40px;">
<div id="header">
	<div class="navbar navbar-fixed-top navbar-inverse">
		<div class="navbar-inner">
			<div class="container">
			    <span class="brand">Adon</span>
			    <ul class="nav">
			    	<?php 
			    	if($page=='leaflet')
			    	{	
			    		echo '<li class="active"><a href="#list" data-action="load"><i class="icon-home icon-white"></i> Search</a></li>';
			    		if(!empty($user_id))
						{
    						echo '<li><a href="#ulist" data-action="load"><i class="icon-user icon-white"></i> My account</a></li>';
    					}
    					echo '<button id="add_object_button" class="btn btn-primary">Add an object</button>';
			    	}
			    	else
			    	{
			    		echo '<li><a href="pages/view/leaflet"><i class="icon-home icon-white"></i> Home</a></li>';
			    	}
			    	?>
  				</ul>
			    
			    <ul class="nav pull-right">
				    <li id="connection">
	    				<a href="#" onClick="login();">Connect with Facebook</a>
			    	</li>
			    	<li id="user">
	    				<a href="#" onClick="logout()">Disconnect</a>
			    	</li>
	  			</ul>
			</div>
		</div>
	</div>
</div>

<!-- Modal -->
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">Account manager</h3>
  </div>
  <div id="modal-body" class="modal-body">
    <p>Something is wrong!</p>
  </div>
</div>

<div id="main" class="row-fluid">